package cl.trineo.parkingspace;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.json.simple.JSONObject;


/**
 * Servlet implementation class LocalizacionActual
 */
public class CalificacionParkingSpace extends HttpServlet {
	private static final long serialVersionUID = 1L;

    /**
     * Default constructor. 
     */
    public CalificacionParkingSpace() {
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		
		System.out.println(request.getParameter("idParkingSpace"));
		System.out.println(request.getParameter("calificacion"));
		
		
		
		
		JSONObject obj=new JSONObject();
		obj.put("actual","OK");
		System.out.print(obj);
		
		
		ServletOutputStream salida = response.getOutputStream();

		response.setContentType("text/html");

		//String cadena = req.getParameter("TEXTO");

		salida.println (obj.toString());

		}


	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
	}

}
